<?php

namespace app\customer\controller;
use app\common\controller\PCBase;
use app\common\controller\DBase;
use app\common\library\Upload;
use app\customer\logic\ReviewsLogic;
use  think\App;
class Reviews extends PCBase
{

    /**
     * @desc   评论基础信息列表
     * @author luckyXiong
     * @date   2025-05-13
     */
    public function getList(){
        $params     = $this->request->post();
        return     (new ReviewsLogic())->getList($params);
    }



    /**
     * @desc   导入数据处理
     * @author luckyXiong
     * @date   2025-05-14
     */
    public function importInfo(){
        $file   = $this->request->file('file');
        $tel    = $this->getAdminTel();
        $data['file'] = $file;
        $data['tel']  = $tel;
        (new ReviewsLogic())->importInfo($data);
        return  $this->jsonMessage(200,true,'文件异步上传成功,等待一会可以查看结果!',null);
    }


    /**
     * @desc   导入图片数据
     * @author luckyXiong
     * @date   2025-05-14
     */
    public function import_url(){
        $params     = $this->request->post();
        return     (new ReviewsLogic())->import_url($params);
    }


    /**
     * @desc   导入数据测试
     * @author luckyXiong
     * @date   2025-05-14
     */
    public function import_order_review_page(){
        $params     = $this->request->post();
        return     (new ReviewsLogic())->import_order_review_page($params);
    }



    /**
     * @desc   导出接口
     * @author luckyXiong
     * @date   2025-04-24
     */
    public function export(){
        $params     = $this->request->post();
        return     (new ReviewsLogic())->export($params);
    }


    /**
     * @desc   删除spu
     * @author luckyXiong
     * @date   2025-04-24
     */
    public function deleteSpu(){
        $params     = $this->request->post();
        return     (new ReviewsLogic())->deleteSpu($params);
    }






    /**
     * @desc   资产图片上传
     * @author luckyXiong
     * @date   2025-04-24
     */
    public function test_url(){
        $params  = $this->request->post();
        $res     = (new ReviewsLogic())->test_url($params);
        return  $this->jsonMessage(200,true,'获取成功',$res);
    }








}